package com.bys.security;

import com.bys.system.model.SysUserModel;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
public class CrmUser extends User {
    private final SysUserModel sysUserModel;
    public CrmUser(SysUserModel sysUserModel, Collection<? extends GrantedAuthority> authorities) {
        super(sysUserModel.getUsername(), sysUserModel.getPassword(), authorities);
        this.sysUserModel = sysUserModel;
    }

    public SysUserModel getSysUserModel() {
        return sysUserModel;
    }
}
